package com.cskaoyan.mall.service;

import com.cskaoyan.mall.model.bo.goods.AskGoodsMsgBo;
import com.cskaoyan.mall.model.bo.goods.GoodsDetailsBo;
import com.cskaoyan.mall.model.bo.goods.GoodsTypeBo;
import com.cskaoyan.mall.model.bo.goods.UpdateGoodsDetailsBo;
import com.cskaoyan.mall.model.po.Type;
import com.cskaoyan.mall.model.vo.goods.*;
import com.cskaoyan.mall.model.vo.order.OrderMessageVo;
import com.cskaoyan.mall.model.vo.user.UserMessageVo;

import java.util.List;

/**
 * @ClassName: GoodsService
 * @Description: TODO
 * @Auther 庄左
 * @Date 2022/6/30 10:30
 * @Version
 **/
public interface GoodsService {
    List<GoodsTypeVo> selectType();
    List<GoodsMessageVo> selectGoodsByType(Type type);
    //插入类别，插入失败返回false
    boolean addType(GoodsTypeBo goodsTypeBo);

    void addGoods(GoodsDetailsBo goodsDetailsBo);
    void insertSpec(GoodsDetailsBo goodsDetailsBo,Integer id);

    GoodVo selectGood(Integer id);
    List<SpecVo> selectSpec(Integer id);

    void deteleGoods(Integer id);


    void selectUpdateGood(UpdateGoodsDetailsBo goods);
    void selectUpdateGoodSpec(UpdateGoodsDetailsBo goods, Integer goodid);

    void deleteSpec(Integer goodsId,String specName);

    void deleteType(Integer id);

    GoodVo selectGoodByGoodsIdInMall(Integer id);


    List<CommentVo> selectGoodsCommentByGoodsId(Integer goodsId);

    int insertGoodsMsg(AskGoodsMsgBo askGoodsMsgBo);

    List<GoodsSearchVo> selectGoodsByGoodsName(String keyword);

    // OrderMessageVo selectUserIdByOrderIdInOrder(Integer userId);
    // UserMessageVo selectUserNickNameByUserId(Integer userId);


}
